package com.css.dzj.dzjjcss.modules.resultregister.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.hibernate.annotations.GenericGenerator;

import javax.persistence.*;
import java.util.Date;
import java.util.Objects;

@Entity
@Table(name = "RESULTREGISTER", schema = "DZJJCSS", catalog = "")
public class ResultRegisterEntity {
    //主键ID
    private String id;
    //标题
    private String title;
    //经办人
    private String createUser;
    //办理机构
    private String createUserUnit;
    //输入时间
    private Date createTime;
    //监管对象名称
    private String supervisionObjectName;
    //监管结果
    private String supervisionRecordContent;
    //监管实体类别（监测环境、其他）
    private String supervisionType;
    //是否有附件
    private String commentCode;
    //附件
    private String commAttachment;
    //办理时间
    private Date submitTime;
    //修改时间
    private Date updateTime;
    //修改人
    private String updateUser;
    //状态
    private String status;
    //组织等级
    private String orgLevel;
    //组织名称
    private String orgName;
    //删除标志
    private String delFlag;
    //撤回原因
    private String otherMsg;
    //备用字段
    private String otherTip;
    //用来排序的时间
    private Date pxTime;
    //项目名称
    private String projectName;
    //建设位置
    private String jianPlace;
    //单位名称
    private String unitName;
    //行政区划
    private String administrativeDivision;
    //工程类型
    private String projectType;
    //项目类型
    private String itemType;
    //联系人
    private String linkman;
    //联系人电话
    private String linkmanPhone;
    //是否影响，0是未影响，1是影响
    private String isAffect;
    //是否办理许可证，0是已办理，1是未办理，2是无需办理
    private String administrativeLicense;

    @Id
    @Column(name = "Id")
    @GeneratedValue(generator = "idGenerator")
    @GenericGenerator(name = "idGenerator", strategy = "com.css.dzj.dzjjcss.common.util.SnowflakeId")
    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    @Basic
    @Column(name = "title")
    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    @Basic
    @Column(name = "Create_User")
    public String getCreateUser() {
        return createUser;
    }

    public void setCreateUser(String createUser) {
        this.createUser = createUser;
    }

    @Basic
    @Column(name = "Create_User_Unit")
    public String getCreateUserUnit() {
        return createUserUnit;
    }

    public void setCreateUserUnit(String createUserUnit) {
        this.createUserUnit = createUserUnit;
    }

    @Basic
    @Column(name = "Create_Time")
    @JsonFormat(shape= JsonFormat.Shape.STRING,pattern="yyyy-MM-dd",timezone="GMT+8")
    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    @Basic
    @Column(name = "Supervision_Object_Name")
    public String getSupervisionObjectName() {
        return supervisionObjectName;
    }

    public void setSupervisionObjectName(String supervisionObjectName) {
        this.supervisionObjectName = supervisionObjectName;
    }

    @Basic
    @Column(name = "Supervision_Record_Content")
    public String getSupervisionRecordContent() {
        return supervisionRecordContent;
    }

    public void setSupervisionRecordContent(String supervisionRecordContent) {
        this.supervisionRecordContent = supervisionRecordContent;
    }

    @Basic
    @Column(name = "Supervision_Type")
    public String getSupervisionType() {
        return supervisionType;
    }

    public void setSupervisionType(String supervisionType) {
        this.supervisionType = supervisionType;
    }

    @Basic
    @Column(name = "Comment_Code")
    public String getCommentCode() {
        return commentCode;
    }

    public void setCommentCode(String commentCode) {
        this.commentCode = commentCode;
    }

    @Basic
    @Column(name = "Comm_Attachment")
    public String getCommAttachment() {
        return commAttachment;
    }

    public void setCommAttachment(String commAttachment) {
        this.commAttachment = commAttachment;
    }

    @Basic
    @Column(name = "Submit_Time")
    @JsonFormat(shape= JsonFormat.Shape.STRING,pattern="yyyy-MM-dd",timezone="GMT+8")
    public Date getSubmitTime() {
        return submitTime;
    }

    public void setSubmitTime(Date submitTime) {
        this.submitTime = submitTime;
    }

    @Basic
    @Column(name = "Update_Time")
    @JsonFormat(shape= JsonFormat.Shape.STRING,pattern="yyyy-MM-dd",timezone="GMT+8")
    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    @Basic
    @Column(name = "Update_User")
    public String getUpdateUser() {
        return updateUser;
    }

    public void setUpdateUser(String updateUser) {
        this.updateUser = updateUser;
    }

    @Basic
    @Column(name = "Status")
    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    @Basic
    @Column(name = "Org_Level")
    public String getOrgLevel() {
        return orgLevel;
    }

    public void setOrgLevel(String orgLevel) {
        this.orgLevel = orgLevel;
    }

    @Basic
    @Column(name = "Org_Name")
    public String getOrgName() {
        return orgName;
    }

    public void setOrgName(String orgName) {
        this.orgName = orgName;
    }

    @Basic
    @Column(name = "del_Flag")
    public String getDelFlag() {
        return delFlag;
    }

    public void setDelFlag(String delFlag) {
        this.delFlag = delFlag;
    }

    @Basic
    @Column(name = "Other_Msg")
    public String getOtherMsg() {
        return otherMsg;
    }

    public void setOtherMsg(String otherMsg) {
        this.otherMsg = otherMsg;
    }

    @Basic
    @Column(name = "Other_Tip")
    public String getOtherTip() {
        return otherTip;
    }

    public void setOtherTip(String otherTip) {
        this.otherTip = otherTip;
    }

    @Basic
    @Column(name = "px_Time")
    @JsonFormat(shape= JsonFormat.Shape.STRING,pattern="yyyy-MM-dd HH:mm",timezone="GMT+8")
    public Date getPxTime() {
        return pxTime;
    }

    public void setPxTime(Date pxTime) {
        this.pxTime = pxTime;
    }

    @Basic
    @Column(name = "Project_Name")
    public String getProjectName() {
        return projectName;
    }

    public void setProjectName(String projectName) {
        this.projectName = projectName;
    }

    @Basic
    @Column(name = "Jian_Place")
    public String getJianPlace() {
        return jianPlace;
    }

    public void setJianPlace(String jianPlace) {
        this.jianPlace = jianPlace;
    }

    @Basic
    @Column(name = "Unit_Name")
    public String getUnitName() {
        return unitName;
    }

    public void setUnitName(String unitName) {
        this.unitName = unitName;
    }

    @Basic
    @Column(name = "Administrative_Division")
    public String getAdministrativeDivision() {
        return administrativeDivision;
    }

    public void setAdministrativeDivision(String administrativeDivision) {
        this.administrativeDivision = administrativeDivision;
    }

    @Basic
    @Column(name = "Project_Type")
    public String getProjectType() {
        return projectType;
    }

    public void setProjectType(String projectType) {
        this.projectType = projectType;
    }

    @Basic
    @Column(name = "Item_Type")
    public String getItemType() {
        return itemType;
    }

    public void setItemType(String itemType) {
        this.itemType = itemType;
    }

    @Basic
    @Column(name = "Linkman")
    public String getLinkman() {
        return linkman;
    }

    public void setLinkman(String linkman) {
        this.linkman = linkman;
    }

    @Basic
    @Column(name = "Linkman_Phone")
    public String getLinkmanPhone() {
        return linkmanPhone;
    }

    public void setLinkmanPhone(String linkmanPhone) {
        this.linkmanPhone = linkmanPhone;
    }

    @Basic
    @Column(name = "Is_Affect")
    public String getIsAffect() {
        return isAffect;
    }

    public void setIsAffect(String isAffect) {
        this.isAffect = isAffect;
    }

    @Basic
    @Column(name = "Administrative_License")
    public String getAdministrativeLicense() {
        return administrativeLicense;
    }

    public void setAdministrativeLicense(String administrativeLicense) {
        this.administrativeLicense = administrativeLicense;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        ResultRegisterEntity that = (ResultRegisterEntity) o;
        return Objects.equals(id, that.id) &&
                Objects.equals(title, that.title) &&
                Objects.equals(createUser, that.createUser) &&
                Objects.equals(createUserUnit, that.createUserUnit) &&
                Objects.equals(createTime, that.createTime) &&
                Objects.equals(supervisionObjectName, that.supervisionObjectName) &&
                Objects.equals(supervisionRecordContent, that.supervisionRecordContent) &&
                Objects.equals(supervisionType, that.supervisionType) &&
                Objects.equals(commentCode, that.commentCode) &&
                Objects.equals(commAttachment, that.commAttachment) &&
                Objects.equals(submitTime, that.submitTime) &&
                Objects.equals(updateTime, that.updateTime) &&
                Objects.equals(updateUser, that.updateUser) &&
                Objects.equals(status, that.status) &&
                Objects.equals(orgLevel, that.orgLevel) &&
                Objects.equals(orgName, that.orgName) &&
                Objects.equals(delFlag, that.delFlag) &&
                Objects.equals(otherMsg, that.otherMsg) &&
                Objects.equals(otherTip, that.otherTip) &&
                Objects.equals(pxTime, that.pxTime) &&
                Objects.equals(projectName, that.projectName) &&
                Objects.equals(jianPlace, that.jianPlace) &&
                Objects.equals(unitName, that.unitName) &&
                Objects.equals(administrativeDivision, that.administrativeDivision) &&
                Objects.equals(projectType, that.projectType) &&
                Objects.equals(itemType, that.itemType) &&
                Objects.equals(linkman, that.linkman) &&
                Objects.equals(linkmanPhone, that.linkmanPhone) &&
                Objects.equals(isAffect, that.isAffect) &&
                Objects.equals(administrativeLicense, that.administrativeLicense);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, title, createUser, createUserUnit, createTime, supervisionObjectName, supervisionRecordContent, supervisionType, commentCode, commAttachment, submitTime, updateTime, updateUser, status, orgLevel, orgName, delFlag, otherMsg, otherTip, pxTime, projectName, jianPlace, unitName, administrativeDivision, projectType, itemType, linkman, linkmanPhone, isAffect, administrativeLicense);
    }
}
